import { Component, Input, OnInit } from "@angular/core";


export class MenuGroup
{
    title: string;
    items: Array<MenuItem>;
}


export class MenuItem
{
    title: string;
    icon: string;
    children: Array<MenuGroup>;
}


@Component({
    selector: "sidebar",
    templateUrl: "./sidebar.component.html",
    styleUrls: ["./sidebar.component.scss"],
})
export class SidebarComponent implements OnInit
{

    private items: Array<any>;


    public ngOnInit()
    {
        // fill items
        var menu = [];

        this.items = [{
            title: "生产管理",
            children: [{
                title: "单据",
                items: [{
                    title: "生产加工单",
                }, ],
            }, {
                title: "报表",
                items: [{
                    title: "生产加工单产成品明细表",
                }, {
                    title: "生产加工单材料明细表",
                }, {
                    title: "生产加工单产成品统计表",
                }, {
                    title: "生产加工单材料统计表",
                }, ],
            }, ],
        }, {
            title: "基础设置",
            children: [{
                title: "基本信息",
                items: [{
                    title: "部门",
                }, {
                    title: "员工",
                }, {
                    title: "计量单位",
                }, {
                    title: "存货",
                }, {
                    title: "物料清单",
                }, {
                    title: "仓库",
                }, {
                    title: "项目",
                }, ],
            }, ],
        }, ];
    }

};